num = eval(input('请输入一个大于0的基数:'))
if num%2 == 0:
    print(num,'不是基数')
if not num%2 == 0:
    print(num,'是基数,进行打印')

    top_rownum = (num+1)//2
    print('top_rownum',top_rownum)
    for i in range(1,top_rownum+1):
        for j in range(top_rownum-i):   #1-4 2-3 3-2
            print(' ',end='')

        for k in range(1,2*i):  #  1,2 2,4  3,6
            if k==1 or k==2*i-1:
                print('*',end='')
            else:
                print(' ', end='')
        print()
    botton_row = num//2
    for i in range(1,botton_row+1):
        for j in range(i):   #1-4 2-3 3-2
            print(' ',end='')
        for k in range(1,2*botton_row-2*i+2):  # 1,6 2,4 3,2
            if k==1 or k== (2*botton_row-2*i+2)-1:
                print('*',end='')
            else:
                print(' ', end='')
        print()


